3.201 \(\int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=47 \[ -\frac{a^2 \csc ^2(c+d x)}{2 d}-\frac{2 a^2 \csc (c+d x)}{d}+\frac{a^2 \log (\sin (c+d x))}{d} \]

[Out]

(-2*a^2*Csc[c + d*x])/d - (a^2*Csc[c + d*x]^2)/(2*d) + (a^2*Log[Sin[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0648706, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2833, 12, 43} \[ -\frac{a^2 \csc ^2(c+d x)}{2 d}-\frac{2 a^2 \csc (c+d x)}{d}+\frac{a^2 \log (\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*Csc[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

(-2*a^2*Csc[c + d*x])/d - (a^2*Csc[c + d*x]^2)/(2*d) + (a^2*Log[Sin[c + d*x]])/d

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a^3 (a+x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{a^2 \operatorname{Subst}\left (\int \frac{(a+x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{a^2 \operatorname{Subst}\left (\int \left (\frac{a^2}{x^3}+\frac{2 a}{x^2}+\frac{1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{2 a^2 \csc (c+d x)}{d}-\frac{a^2 \csc ^2(c+d x)}{2 d}+\frac{a^2 \log (\sin (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0169466, size = 42, normalized size = 0.89 \[ a^2 \left (-\frac{\csc ^2(c+d x)}{2 d}-\frac{2 \csc (c+d x)}{d}+\frac{\log (\sin (c+d x))}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*Csc[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

a^2*((-2*Csc[c + d*x])/d - Csc[c + d*x]^2/(2*d) + Log[Sin[c + d*x]]/d)

________________________________________________________________________________________

Maple [A]  time = 0.04, size = 48, normalized size = 1. \begin{align*} -2\,{\frac{{a}^{2}}{d\sin \left ( dx+c \right ) }}+{\frac{{a}^{2}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{{a}^{2}}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x)

[Out]

-2/d*a^2/sin(d*x+c)+a^2*ln(sin(d*x+c))/d-1/2/d*a^2/sin(d*x+c)^2

________________________________________________________________________________________

Maxima [A]  time = 1.18434, size = 58, normalized size = 1.23 \begin{align*} \frac{2 \, a^{2} \log \left (\sin \left (d x + c\right )\right ) - \frac{4 \, a^{2} \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*(2*a^2*log(sin(d*x + c)) - (4*a^2*sin(d*x + c) + a^2)/sin(d*x + c)^2)/d

________________________________________________________________________________________

Fricas [A]  time = 1.66186, size = 146, normalized size = 3.11 \begin{align*} \frac{4 \, a^{2} \sin \left (d x + c\right ) + a^{2} + 2 \,{\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (d x + c\right )\right )}{2 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/2*(4*a^2*sin(d*x + c) + a^2 + 2*(a^2*cos(d*x + c)^2 - a^2)*log(1/2*sin(d*x + c)))/(d*cos(d*x + c)^2 - d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)**3*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.31304, size = 59, normalized size = 1.26 \begin{align*} \frac{2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac{4 \, a^{2} \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/2*(2*a^2*log(abs(sin(d*x + c))) - (4*a^2*sin(d*x + c) + a^2)/sin(d*x + c)^2)/d